Xbasic

OBJECT.HAS_METHOD Function

Syntax

Result_Flag as L = .Has_Method(C method_name)

Arguments

method_name

The name of a method.

Description

Indicates whether or not an object has a specified method.

Discussion

The <OBJECT>.HAS_METHOD() method applies to:

Alpha Anywhere (for <OBJECT> use the keyword "A5")
Control Panel (for <OBJECT> use the keyword "CONTROLPANEL")
Browses (for <OBJECT> use either the <BROWSE> pointer or the name of the browse)
Forms (for <OBJECT> use either the <FORM> pointer or the name of the form)
Form Controls (for <OBJECT> use the <CONTROL> pointer or the address of the control)

The <OBJECT>.HAS_METHOD() method returns .T. (TRUE) if the <name> object has the specified method; otherwise, it returns .F. (FALSE).

Example

dim ptr as P
ptr = form.load("Travel Time")
? ptr.Has_Method("foo") ?.F.?
 ptr.Has_Method("Name") ?.T.

Limitations

Desktop applications only.

See Also